﻿<!--#include virtual="/Common/Config.asp" -->
<!--#include virtual="/Common/conn.asp" -->
<!--#include virtual="/2010admin/Check_IsLogin.asp" -->
<!--#include virtual="/Common/Function.asp" -->
<!--#include virtual="/Common/MD5.asp"-->
<!--#include file="User_Inc.asp" -->
<!--#include virtual="/2010admin/Check_Priv.asp"-->

<%

If Request.ServerVariables ("Request_Method")="POST" Then

	'禁止从网站外部提交数据
	Call Deny_OutSiteSubit()

	Call User_Add()	
End If

%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="/2010admin/css/default.css" type="text/css" rel="stylesheet">
<title><%=web_title%></title>
</head>
<body onload="nhrefstate()">
<script type="text/javascript">
function CG_popedom(strers)
{
  if (strers == "0") document.getElementById("tr_popedom").style.display = '';
  else document.getElementById("tr_popedom").style.display = 'none';
}
function checkform(){
	username = document.form.username.value;
	password = document.form.password.value;
	if(username=="")
	{
		alert("请输入用户名!");
		document.form.username.focus();
		return false;
	}
	if(password=="")
	{
		alert("请输入用户密码!");
		document.form.password.focus();
		return false;
	}
}
</script>
<table border="0" width="100%" cellSpacing="0" cellPadding="0">
  <tr>
    <td width="100%" height="5"></td>
  </tr>
  <tr>
    <td width="100%" align="center">
      <table border="0" width="98%" cellSpacing="0" cellPadding="0">
        <tr>
          <td width="*" align="center" valign="top">
            <table border="0" width="100%" cellSpacing="0" cellPadding="0" class="lrbtline">
              <tr>
                <td width="100%" height="25" class="tbtop">管理导航</td>
              </tr>
              <tr>
                <td width="100%" align="center">
                  <table border="0" width="98%" cellSpacing="0" cellPadding="0">
                    <tr>
                      <td width="100%" height="5"></td>
                    </tr>
                  </table>
                  <table border="0" width="98%" cellSpacing="0" cellPadding="0">
                    <tr>
                      <td width="100%" height="20">&nbsp;<img src="/2010admin/images/sico.gif" border="0">&nbsp;<span id="userlist"><a href="User_Query.asp">用户列表</a></span>&nbsp;<img src="/2010admin/images/sico.gif" border="0">&nbsp;<span id="useradd"><a href="User_Add.asp">增加新的用户</a></span></td>
                    </tr>
                    <tr>
                      <td width="100%" height="5"></td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
            <table border="0" width="100%" cellSpacing="0" cellPadding="0">
              <tr>
                <td width="100%" height="5"></td>
              </tr>
            </table>
            <table border="0" width="100%" cellSpacing="0" cellPadding="0" class="lrbtline">
              <tr>
                <td width="100%" height="25" class="tbtop">增加新的用户</td>
              </tr>
              <tr>
                <td width="100%" align="center">
                  <table border="0" width="98%" cellSpacing="0" cellPadding="0">
                    <tr>
                      <td width="100%" height="5"></td>
                    </tr>
                  </table>
                  <table border="0" width="98%" cellSpacing="0" cellPadding="0">
                  <form name="form" method="post" action="" onSubmit="return checkform();">
                    <tr>
                      <td width="80" height="25">用户名</td>
                      <td width="*"><input type="text" name="username" size="20"></td>
                    </tr>
                    <tr>
                      <td width="80" height="25">密码</td>
                      <td width="*"><input type="password" name="password" size="20"></td>
                    </tr>
                    <tr>
                      <td height="25">超级管理员</td>
                      <td>
					  <select name="super" class="select" onchange="CG_popedom(this.value)"><option value="1" selected>是</option><option value="0">否</option></select> 
					  </td>
                    </tr>
                    <tr>
                      <td height="5"></td>
                      <td></td>
                    </tr>
                    <tr id="tr_popedom" style="DISPLAY: none">
                      <td valign="top">所属角色</td>
                      <td>
					   <%

					    sql = " SELECT RoleID,RoleName FROM Admin_Role  ORDER BY RoleName ASC "

						Set rs = conn.EXECUTE(sql)
						j=1
						Do While Not rs.Eof 							
							
							Response.write "<input type=""checkbox"" class=""radio"" name=""RoleID"" value="""&rs(0)&""">"&rs(1)&"&nbsp;"
							If J Mod 5=0 Then Response.write "<br />"
							j=j+1
							
							rs.Movenext

						Loop
						
						rs.close
		
						
						%>
					  &nbsp;
					  </td>
                    </tr>
                    <tr>
                      <td height="5"></td>
                      <td></td>
                    </tr>
                    <tr>
                      <td height="25">使用</td>
                      <td><input type="radio" class="radio" name="lock" value="1" checked>是&nbsp;<input type="radio" class="radio" name="lock" value="0" >否</td>
                    </tr>
                    <tr>
                      <td height="20"></td>
                      <td class="green">系统管理的权限谨慎分配，系统管理的权限非常大</td>
                    </tr>
                    <tr>
                      <td height="20"></td>
                      <td class="green">超级管理员拥有所有的管理权限，开设超级管理员请谨慎</td>
                    </tr>
                    <tr>
                      <td height="25"></td>
                      <td><input type="submit" name="submit1" value="提交" class="button">&nbsp;<input type="reset" name="reset" value="取消" class="button"></td>
                    </tr>
                  </form>
                  </table>
                  <table border="0" width="98%" cellSpacing="0" cellPadding="0">
                    <tr>
                      <td width="100%" height="5"></td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td width="100%" height="5"></td>
  </tr>
</table>
</body>
</html>
<%
Call conn_close()
%>

